
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>跨平台框架总览（Flutter、RN、KMP、CMP、Qt、Electron、Cordova） · 开源鸿蒙跨平台开发教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="技术选型与对比.html" />
    
    
    <link rel="prev" href="../" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.nutpie.net/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.npmjs.com/package/package" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://blog.51cto.com/jianguo" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        <li class="header">第一篇：总览与准备</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="跨平台框架总览.html">
            
                <a href="跨平台框架总览.html">
            
                    
                    跨平台框架总览（Flutter、RN、KMP、CMP、Qt、Electron、Cordova）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="技术选型与对比.html">
            
                <a href="技术选型与对比.html">
            
                    
                    技术选型与对比（性能、生态、鸿蒙支持）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="开发环境与工具.html">
            
                <a href="开发环境与工具.html">
            
                    
                    开发环境与工具（DevEco Studio、ArkUI、命令行）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="架构与适配策略.html">
            
                <a href="架构与适配策略.html">
            
                    
                    架构与适配策略（Stage 模型、ArkUI 与各栈映射）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="构建与发布流程总览.html">
            
                <a href="构建与发布流程总览.html">
            
                    
                    构建与发布流程总览
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第二篇：Flutter 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../chapter2/环境搭建与项目初始化.html">
            
                <a href="../chapter2/环境搭建与项目初始化.html">
            
                    
                    环境搭建与项目初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../chapter2/鸿蒙适配指南.html">
            
                <a href="../chapter2/鸿蒙适配指南.html">
            
                    
                    鸿蒙适配指南（ArkUI 能力对接、Plugin 适配）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../chapter2/原生能力桥接.html">
            
                <a href="../chapter2/原生能力桥接.html">
            
                    
                    原生能力桥接（权限、设备、文件、网络）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../chapter2/UI导航与生命周期适配.html">
            
                <a href="../chapter2/UI导航与生命周期适配.html">
            
                    
                    UI/导航与生命周期适配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../chapter2/调试与性能优化.html">
            
                <a href="../chapter2/调试与性能优化.html">
            
                    
                    调试与性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="../chapter2/实战案例与发布.html">
            
                <a href="../chapter2/实战案例与发布.html">
            
                    
                    实战案例与发布
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第三篇：React Native 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../chapter3/环境搭建与项目初始化.html">
            
                <a href="../chapter3/环境搭建与项目初始化.html">
            
                    
                    环境搭建与项目初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../chapter3/鸿蒙适配指南.html">
            
                <a href="../chapter3/鸿蒙适配指南.html">
            
                    
                    鸿蒙适配指南（Bridge/Module 适配）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../chapter3/原生能力桥接.html">
            
                <a href="../chapter3/原生能力桥接.html">
            
                    
                    原生能力桥接（权限、设备、文件、网络）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../chapter3/UI导航与生命周期适配.html">
            
                <a href="../chapter3/UI导航与生命周期适配.html">
            
                    
                    UI/导航与生命周期适配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../chapter3/调试与性能优化.html">
            
                <a href="../chapter3/调试与性能优化.html">
            
                    
                    调试与性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../chapter3/实战案例与发布.html">
            
                <a href="../chapter3/实战案例与发布.html">
            
                    
                    实战案例与发布
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第四篇：KMP/CMP 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="4.1" >
            
                <span>
            
                    
                    KMP 共享模块设计与工程搭建
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" >
            
                <span>
            
                    
                    CMP UI 适配与组件封装
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" >
            
                <span>
            
                    
                    Harmony 原生能力交互（权限、设备、文件、网络）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" >
            
                <span>
            
                    
                    测试、调试与性能优化
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" >
            
                <span>
            
                    
                    实战案例与发布
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">第五篇：Qt 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="5.1" >
            
                <span>
            
                    
                    环境搭建与工程配置
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" >
            
                <span>
            
                    
                    QML/Widget 与 ArkUI 能力映射
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" >
            
                <span>
            
                    
                    原生能力调用与平台适配
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" >
            
                <span>
            
                    
                    调试、性能与打包发布
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="5.5" >
            
                <span>
            
                    
                    实战案例
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">第六篇：Electron 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="6.1" >
            
                <span>
            
                    
                    环境搭建与工程创建
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" >
            
                <span>
            
                    
                    渲染进程与主进程适配策略
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="6.3" >
            
                <span>
            
                    
                    原生能力桥接（Node 原生模块 / Harmony 接口）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="6.4" >
            
                <span>
            
                    
                    调试、性能与打包发布
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="6.5" >
            
                <span>
            
                    
                    实战案例
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">第七篇：Cordova 开发鸿蒙</li>
        
        
    
        <li class="chapter " data-level="7.1" >
            
                <span>
            
                    
                    环境搭建与工程创建
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="7.2" >
            
                <span>
            
                    
                    插件开发与适配（Platform/Plugin）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="7.3" >
            
                <span>
            
                    
                    原生能力调用（权限、设备、文件、网络）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="7.4" >
            
                <span>
            
                    
                    调试、性能与打包发布
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="7.5" >
            
                <span>
            
                    
                    实战案例
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">第八篇：通用适配与最佳实践</li>
        
        
    
        <li class="chapter " data-level="8.1" >
            
                <span>
            
                    
                    跨平台通用适配策略（路由、状态、资源）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="8.2" >
            
                <span>
            
                    
                    性能与资源管理（包体积、启动速度、内存）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="8.3" >
            
                <span>
            
                    
                    模块化与插件管理（多技术栈协作）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="8.4" >
            
                <span>
            
                    
                    自动化构建与 CI/CD
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="8.5" >
            
                <span>
            
                    
                    发布到应用市场与灰度方案
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="8.6" >
            
                <span>
            
                    
                    质量保障与监控
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">第九篇：附录</li>
        
        
    
        <li class="chapter " data-level="9.1" >
            
                <span>
            
                    
                    常见问题（FAQ）
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="9.2" >
            
                <span>
            
                    
                    术语表与概念索引
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="9.3" >
            
                <span>
            
                    
                    参考资料与链接
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="9.4" >
            
                <span>
            
                    
                    致谢
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >跨平台框架总览（Flutter、RN、KMP、CMP、Qt、Electron、Cordova）</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="container">
                    <!--
目的：提供 HarmonyOS 跨平台框架总览，帮助选型与理解适配范围。
内容结构：框架列表、鸿蒙支持现状、适配建议、进一步阅读。
-->
<h1 id="&#x8DE8;&#x5E73;&#x53F0;&#x6846;&#x67B6;&#x603B;&#x89C8;&#xFF08;flutter&#x3001;rn&#x3001;kmp&#x3001;cmp&#x3001;qt&#x3001;electron&#x3001;cordova&#xFF09;"><a name="&#x8DE8;&#x5E73;&#x53F0;&#x6846;&#x67B6;&#x603B;&#x89C8;&#xFF08;flutter&#x3001;rn&#x3001;kmp&#x3001;cmp&#x3001;qt&#x3001;electron&#x3001;cordova&#xFF09;" class="plugin-anchor" href="#&#x8DE8;&#x5E73;&#x53F0;&#x6846;&#x67B6;&#x603B;&#x89C8;&#xFF08;flutter&#x3001;rn&#x3001;kmp&#x3001;cmp&#x3001;qt&#x3001;electron&#x3001;cordova&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8DE8;&#x5E73;&#x53F0;&#x6846;&#x67B6;&#x603B;&#x89C8;&#xFF08;Flutter&#x3001;RN&#x3001;KMP&#x3001;CMP&#x3001;Qt&#x3001;Electron&#x3001;Cordova&#xFF09;</h1>
<h2 id="&#x76EE;&#x6807;"><a name="&#x76EE;&#x6807;" class="plugin-anchor" href="#&#x76EE;&#x6807;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x76EE;&#x6807;</h2>
<ul>
<li>&#x8BA4;&#x8BC6;&#x5E38;&#x89C1;&#x8DE8;&#x5E73;&#x53F0;&#x6280;&#x672F;&#x6808;&#x5728;&#x9E3F;&#x8499;&#x4E0A;&#x7684;&#x53EF;&#x884C;&#x6027;&#x4E0E;&#x9002;&#x914D;&#x65B9;&#x5411;&#x3002;</li>
<li>&#x660E;&#x786E;&#x6BCF;&#x79CD;&#x6280;&#x672F;&#x5728; UI&#x3001;&#x539F;&#x751F;&#x80FD;&#x529B;&#x3001;&#x5DE5;&#x5177;&#x94FE;&#x4E0A;&#x7684;&#x4F18;&#x52BF;&#x4E0E;&#x9650;&#x5236;&#x3002;</li>
</ul>
<h2 id="&#x6846;&#x67B6;&#x901F;&#x89C8;"><a name="&#x6846;&#x67B6;&#x901F;&#x89C8;" class="plugin-anchor" href="#&#x6846;&#x67B6;&#x901F;&#x89C8;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6846;&#x67B6;&#x901F;&#x89C8;</h2>
<ul>
<li>Flutter&#xFF1A;&#x9AD8;&#x6027;&#x80FD;&#x6E32;&#x67D3;&#xFF0C;Widget &#x4E30;&#x5BCC;&#xFF1B;&#x9700;&#x901A;&#x8FC7;&#x63D2;&#x4EF6;/&#x5E73;&#x53F0;&#x901A;&#x9053;&#x9002;&#x914D; Harmony &#x539F;&#x751F;&#x80FD;&#x529B;&#x3002;</li>
<li>React Native&#xFF1A;JS &#x5F00;&#x53D1;&#x3001;&#x539F;&#x751F;&#x6E32;&#x67D3;&#xFF1B;&#x9700;&#x7F16;&#x5199; Harmony Module/Native UI Component &#x9002;&#x914D;&#x5C42;&#x3002;</li>
<li>KMP/CMP&#xFF1A;&#x5171;&#x4EAB;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#xFF08;Kotlin Multiplatform&#xFF09;&#xFF0C;&#x754C;&#x9762;&#x7528; CMP&#xFF08;&#x5982; Compose Multiplatform&#xFF09;&#xFF1B;&#x9700;&#x6865;&#x63A5; ArkUI &#x4E0E;&#x539F;&#x751F;&#x80FD;&#x529B;&#x3002;</li>
<li>Qt&#xFF1A;&#x6210;&#x719F;&#x7684; C++/QML &#x8DE8;&#x5E73;&#x53F0;&#x6846;&#x67B6;&#xFF1B;&#x5728;&#x9E3F;&#x8499;&#x4E0A;&#x9700;&#x5904;&#x7406;&#x7A97;&#x53E3;&#x3001;&#x8F93;&#x5165;&#x3001;&#x6587;&#x4EF6;&#x7B49;&#x5E73;&#x53F0;&#x5DEE;&#x5F02;&#x3002;</li>
<li>Electron&#xFF1A;Web &#x6280;&#x672F; + Node&#xFF1B;&#x9002;&#x5408;&#x684C;&#x9762;/&#x5927;&#x5C4F;&#x5E94;&#x7528;&#xFF0C;&#x9700;&#x9002;&#x914D;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x4E0E;&#x7A97;&#x53E3;&#x7BA1;&#x7406;&#x3002;</li>
<li>Cordova&#xFF1A;WebView &#x5BB9;&#x5668; + &#x63D2;&#x4EF6;&#xFF1B;&#x9002;&#x5408;&#x8F7B;&#x91CF;&#x573A;&#x666F;&#xFF0C;&#x4F9D;&#x8D56;&#x63D2;&#x4EF6;&#x9002;&#x914D; Harmony &#x80FD;&#x529B;&#x3002;</li>
</ul>
<h2 id="&#x9E3F;&#x8499;&#x652F;&#x6301;&#x73B0;&#x72B6;&#x4E0E;&#x9002;&#x914D;&#x70B9;"><a name="&#x9E3F;&#x8499;&#x652F;&#x6301;&#x73B0;&#x72B6;&#x4E0E;&#x9002;&#x914D;&#x70B9;" class="plugin-anchor" href="#&#x9E3F;&#x8499;&#x652F;&#x6301;&#x73B0;&#x72B6;&#x4E0E;&#x9002;&#x914D;&#x70B9;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9E3F;&#x8499;&#x652F;&#x6301;&#x73B0;&#x72B6;&#x4E0E;&#x9002;&#x914D;&#x70B9;</h2>
<ul>
<li>UI &#x4E0E;&#x5BFC;&#x822A;&#xFF1A;ArkUI&#xFF08;&#x58F0;&#x660E;&#x5F0F; UI&#xFF09;&#x4E0E;&#x5404;&#x6808;&#x7684;&#x6620;&#x5C04;&#x7B56;&#x7565;&#x3001;&#x751F;&#x547D;&#x5468;&#x671F;&#x5DEE;&#x5F02;&#x5904;&#x7406;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x6743;&#x9650;&#x3001;&#x8BBE;&#x5907;&#x3001;&#x6587;&#x4EF6;&#x3001;&#x7F51;&#x7EDC;&#x3001;&#x7A97;&#x53E3;&#x4E0E;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x7684;&#x6865;&#x63A5;&#x5C42;&#x8BBE;&#x8BA1;&#x3002;</li>
<li>&#x5DE5;&#x5177;&#x94FE;&#xFF1A;DevEco Studio &#x4E0E;&#x5404;&#x6808; CLI &#x7684;&#x534F;&#x4F5C;&#xFF08;&#x6784;&#x5EFA;&#x3001;&#x8C03;&#x8BD5;&#x3001;&#x7B7E;&#x540D;&#xFF09;&#x3002;</li>
</ul>
<h2 id="&#x573A;&#x666F;&#x5EFA;&#x8BAE;"><a name="&#x573A;&#x666F;&#x5EFA;&#x8BAE;" class="plugin-anchor" href="#&#x573A;&#x666F;&#x5EFA;&#x8BAE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x573A;&#x666F;&#x5EFA;&#x8BAE;</h2>
<ul>
<li>&#x9AD8;&#x6027;&#x80FD;&#x52A8;&#x753B;/&#x590D;&#x6742; UI&#xFF1A;&#x4F18;&#x5148; Flutter &#x6216; CMP&#x3002;</li>
<li>&#x539F;&#x751F;&#x4EA4;&#x4E92; + JS &#x56E2;&#x961F;&#xFF1A;RN &#x66F4;&#x53CB;&#x597D;&#x3002;</li>
<li>&#x8DE8;&#x5E73;&#x53F0;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x590D;&#x7528;&#xFF1A;KMP &#x5F3A;&#x9879;&#x3002;</li>
<li>&#x5DE5;&#x4E1A;/&#x684C;&#x9762;&#x7C7B;&#x5E94;&#x7528;&#xFF1A;Qt &#x6216; Electron&#x3002;</li>
<li>&#x8F7B;&#x91CF;&#x4FE1;&#x606F;&#x5C55;&#x793A;&#xFF1A;Cordova &#x53EF;&#x5FEB;&#x901F;&#x843D;&#x5730;&#x3002;</li>
</ul>
<h2 id="&#x8FDB;&#x4E00;&#x6B65;&#x9605;&#x8BFB;"><a name="&#x8FDB;&#x4E00;&#x6B65;&#x9605;&#x8BFB;" class="plugin-anchor" href="#&#x8FDB;&#x4E00;&#x6B65;&#x9605;&#x8BFB;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8FDB;&#x4E00;&#x6B65;&#x9605;&#x8BFB;</h2>
<ul>
<li>&#x540E;&#x7EED;&#x7AE0;&#x8282;&#x5C06;&#x5206;&#x522B;&#x5C31;&#x4E03;&#x4E2A;&#x6280;&#x672F;&#x6808;&#x5C55;&#x5F00;&#xFF1A;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#x3001;&#x9002;&#x914D;&#x6307;&#x5357;&#x3001;&#x539F;&#x751F;&#x6865;&#x63A5;&#x3001;&#x6027;&#x80FD;&#x4E0E;&#x53D1;&#x5E03;&#x3002;</li>
</ul>
<hr>
<h2 id="harmonyos-&#x9002;&#x914D;&#x6838;&#x5FC3;&#x6982;&#x5FF5;"><a name="harmonyos-&#x9002;&#x914D;&#x6838;&#x5FC3;&#x6982;&#x5FF5;" class="plugin-anchor" href="#harmonyos-&#x9002;&#x914D;&#x6838;&#x5FC3;&#x6982;&#x5FF5;"><i class="fa fa-link" aria-hidden="true"></i></a>HarmonyOS &#x9002;&#x914D;&#x6838;&#x5FC3;&#x6982;&#x5FF5;</h2>
<ul>
<li>ArkUI&#xFF1A;&#x9E3F;&#x8499;&#x58F0;&#x660E;&#x5F0F; UI &#x6846;&#x67B6;&#xFF0C;&#x7EC4;&#x4EF6;&#x4E0E;&#x5E03;&#x5C40;&#x9700;&#x4E0E;&#x5404;&#x8DE8;&#x5E73;&#x53F0;&#x6808;&#x8FDB;&#x884C;&#x6620;&#x5C04;&#x6216;&#x5D4C;&#x5165;&#x3002;</li>
<li>Stage &#x6A21;&#x578B;&#xFF1A;&#x5E94;&#x7528;&#x751F;&#x547D;&#x5468;&#x671F;&#x4E0E; Ability &#x7BA1;&#x7406;&#xFF0C;&#x6D89;&#x53CA;&#x7A97;&#x53E3;&#x3001;&#x8DEF;&#x7531;&#x4E0E;&#x4EFB;&#x52A1;&#x6808;&#x5DEE;&#x5F02;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x901A;&#x8FC7; <code>@ohos.*</code> &#x547D;&#x540D;&#x7A7A;&#x95F4;&#x8BBF;&#x95EE;&#x8BBE;&#x5907;&#x3001;&#x6587;&#x4EF6;&#x3001;&#x7F51;&#x7EDC;&#x3001;&#x7A97;&#x53E3;&#x7B49;&#x7CFB;&#x7EDF; API&#x3002;</li>
<li>&#x6743;&#x9650;&#x6A21;&#x578B;&#xFF1A;&#x5728; <code>module.json5</code> &#x4E2D;&#x58F0;&#x660E;&#x5E76;&#x5728;&#x8FD0;&#x884C;&#x65F6;&#x8BF7;&#x6C42;&#xFF0C;&#x9700;&#x5904;&#x7406;&#x52A8;&#x6001;&#x6388;&#x6743;&#x4E0E;&#x5F02;&#x5E38;&#x515C;&#x5E95;&#x3002;</li>
</ul>
<p>&#x793A;&#x4F8B;&#xFF08;&#x6743;&#x9650;&#x58F0;&#x660E;&#xFF0C;&#x6CE8;&#x91CA;&#x8BF4;&#x660E;&#x7528;&#x9014;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-json"><span class="hljs-comment">// module.json5 &#x7247;&#x6BB5;&#xFF1A;&#x58F0;&#x660E;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&#x4E0E;&#x7F51;&#x7EDC;&#x76F8;&#x5173;&#x6743;&#x9650;</span>
{
  <span class="hljs-string">&quot;module&quot;</span>: {
    <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;entry&quot;</span>,
    <span class="hljs-string">&quot;requestPermissions&quot;</span>: [
      { <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;ohos.permission.GET_WIFI_INFO&quot;</span> },
      { <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;ohos.permission.INTERNET&quot;</span> }
    ]
  }
}
</code></pre>
<p>&#x793A;&#x4F8B;&#xFF08;ArkTS &#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-ts"><span class="hljs-comment">// &#x901A;&#x8FC7; @ohos.deviceInfo &#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x578B;&#x53F7;&#x4E0E;&#x54C1;&#x724C;</span>
<span class="hljs-keyword">import</span> deviceInfo from <span class="hljs-string">&apos;@ohos.deviceInfo&apos;</span>;

<span class="hljs-keyword">const</span> model = deviceInfo.deviceModel;
<span class="hljs-keyword">const</span> brand = deviceInfo.deviceBrand;
<span class="hljs-built_in">console</span>.info(<span class="hljs-string">`[Device] <span class="hljs-subst">${brand}</span> / <span class="hljs-subst">${model}</span>`</span>);
</code></pre>
<hr>
<h2 id="flutter-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="flutter-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#flutter-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>Flutter &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>UI/&#x6E32;&#x67D3;&#xFF1A;Flutter &#x81EA;&#x5E26;&#x6E32;&#x67D3;&#x5F15;&#x64CE;&#xFF0C;&#x4E0D;&#x76F4;&#x63A5;&#x4F9D;&#x8D56; ArkUI&#xFF1B;&#x901A;&#x8FC7;&#x5F15;&#x64CE;&#x9002;&#x914D;&#x5C42;&#x8FD0;&#x884C;&#x4E8E;&#x9E3F;&#x8499;&#x3002;</li>
<li>&#x539F;&#x751F;&#x6865;&#x63A5;&#xFF1A;&#x4F7F;&#x7528; <code>MethodChannel/EventChannel</code> &#x7F16;&#x5199;&#x63D2;&#x4EF6;&#xFF0C;&#x8C03;&#x7528; <code>@ohos.*</code> &#x539F;&#x751F;&#x80FD;&#x529B;&#x3002;</li>
<li>&#x6784;&#x5EFA;/&#x6253;&#x5305;&#xFF1A;&#x4F9D;&#x8D56;&#x9002;&#x914D;&#x8FC7;&#x7684; Flutter &#x5F15;&#x64CE;&#x4E0E;&#x5DE5;&#x5177;&#x94FE;&#xFF0C;&#x7B7E;&#x540D;&#x4E0E;&#x5305;&#x4F53;&#x9075;&#x5FAA;&#x9E3F;&#x8499;&#x53D1;&#x5E03;&#x6D41;&#x7A0B;&#x3002;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF08;Dart &#x4FA7;&#x901A;&#x9053;&#xFF0C;&#x542B;&#x6CE8;&#x91CA;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-dart"><span class="hljs-comment">// Dart&#xFF1A;&#x5B9A;&#x4E49;&#x5E73;&#x53F0;&#x901A;&#x9053;&#xFF0C;&#x8C03;&#x7528;&#x539F;&#x751F;&#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x578B;&#x53F7;</span>
<span class="hljs-keyword">import</span> <span class="hljs-string">&apos;package:flutter/services.dart&apos;</span>;

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OhosDevice</span> </span>{
  <span class="hljs-keyword">static</span> <span class="hljs-keyword">const</span> MethodChannel _channel = MethodChannel(<span class="hljs-string">&apos;ohos/device&apos;</span>);

  <span class="hljs-comment">// &#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x578B;&#x53F7;&#xFF1B;&#x539F;&#x751F;&#x4FA7;&#x9700;&#x5B9E;&#x73B0;&#x5BF9;&#x5E94;&#x65B9;&#x6CD5;&#x540D; &quot;deviceModel&quot;</span>
  <span class="hljs-keyword">static</span> Future&lt;<span class="hljs-built_in">String</span>&gt; deviceModel() <span class="hljs-keyword">async</span> {
    <span class="hljs-keyword">final</span> <span class="hljs-built_in">String</span> model = <span class="hljs-keyword">await</span> _channel.invokeMethod(<span class="hljs-string">&apos;deviceModel&apos;</span>);
    <span class="hljs-keyword">return</span> model;
  }
}
</code></pre>
<p>&#x539F;&#x751F;&#x4FA7;&#xFF08;ArkTS/Java/C++&#xFF09;&#x804C;&#x8D23;&#x8BF4;&#x660E;&#xFF1A;</p>
<ul>
<li>&#x6CE8;&#x518C;&#x901A;&#x9053; <code>ohos/device</code>&#xFF0C;&#x66B4;&#x9732; <code>deviceModel</code> &#x65B9;&#x6CD5;&#x3002;</li>
<li>&#x5185;&#x90E8;&#x8C03;&#x7528; <code>@ohos.deviceInfo.deviceModel</code> &#x8FD4;&#x56DE;&#x5B57;&#x7B26;&#x4E32;&#x3002;</li>
<li>&#x5904;&#x7406;&#x6743;&#x9650;&#x4E0E;&#x5F02;&#x5E38;&#xFF0C;&#x786E;&#x4FDD;&#x63D2;&#x4EF6;&#x5728;&#x7F3A;&#x5C11;&#x6743;&#x9650;&#x65F6;&#x7ED9;&#x4E88;&#x5B89;&#x5168;&#x515C;&#x5E95;&#x3002;</li>
</ul>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>&#x5DE5;&#x7A0B;&#x7ED3;&#x6784;&#x4E0E;&#x5F15;&#x64CE;&#x7248;&#x672C;&#x786E;&#x8BA4;&#xFF08;&#x9002;&#x914D;&#x4ED3;&#x5E93;&#x4E0E;&#x5206;&#x652F;&#xFF09;&#x3002;</li>
<li>&#x63D2;&#x4EF6;&#x80FD;&#x529B;&#x4F18;&#x5148;&#x8986;&#x76D6;&#xFF1A;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&#x3001;&#x7F51;&#x7EDC;&#x3001;&#x5B58;&#x50A8;&#x3001;&#x7A97;&#x53E3;&#x3001;&#x901A;&#x77E5;&#x3001;&#x8DEF;&#x7531;&#x3002;</li>
<li>&#x6027;&#x80FD;&#x76D1;&#x63A7;&#x4E0E;&#x5D29;&#x6E83;&#x4E0A;&#x62A5;&#xFF1A;&#x63A5;&#x5165;&#x9E3F;&#x8499;&#x76D1;&#x63A7;&#x6216;&#x7B2C;&#x4E09;&#x65B9; SDK &#x7684;&#x9E3F;&#x8499;&#x9002;&#x914D;&#x7248;&#x3002;</li>
</ul>
<hr>
<h2 id="react-native-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="react-native-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#react-native-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>React Native &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>UI/&#x6E32;&#x67D3;&#xFF1A;RN &#x901A;&#x8FC7;&#x539F;&#x751F;&#x7EC4;&#x4EF6;&#x6E32;&#x67D3;&#xFF1B;&#x9700;&#x5B9E;&#x73B0; Harmony Native UI Component &#x4E0E; Native Module&#x3002;</li>
<li>&#x539F;&#x751F;&#x6865;&#x63A5;&#xFF1A;&#x5728; JS &#x4FA7;&#x901A;&#x8FC7; <code>NativeModules</code> &#x8C03;&#x7528;&#xFF0C;&#x539F;&#x751F;&#x4FA7;&#x5B9E;&#x73B0; ArkTS/Java &#x6A21;&#x5757;&#x3002;</li>
<li>&#x8DEF;&#x7531;/&#x751F;&#x547D;&#x5468;&#x671F;&#xFF1A;&#x4E0E;&#x9E3F;&#x8499; Stage &#x6A21;&#x578B;&#x5BF9;&#x9F50;&#xFF0C;&#x5904;&#x7406;&#x7A97;&#x53E3;&#x4E0E;&#x4EFB;&#x52A1;&#x6808;&#x5DEE;&#x5F02;&#x3002;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF08;JS &#x4FA7;&#x8C03;&#x7528;&#xFF0C;&#x542B;&#x6CE8;&#x91CA;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-comment">// JS&#xFF1A;&#x901A;&#x8FC7; NativeModules &#x8C03;&#x7528;&#x539F;&#x751F;&#x6A21;&#x5757;&#xFF0C;&#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x578B;&#x53F7;</span>
<span class="hljs-keyword">import</span> { NativeModules } <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;react-native&apos;</span>;

<span class="hljs-keyword">const</span> { OhosDevice } = NativeModules;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getDeviceModel</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-comment">// &#x8981;&#x6C42;&#x539F;&#x751F;&#x6A21;&#x5757;&#x5B9E;&#x73B0; deviceModel &#x65B9;&#x6CD5;</span>
  <span class="hljs-keyword">return</span> <span class="hljs-keyword">await</span> OhosDevice.deviceModel();
}
</code></pre>
<p>&#x539F;&#x751F;&#x4FA7;&#xFF08;ArkTS&#xFF09;&#x804C;&#x8D23;&#x8BF4;&#x660E;&#xFF1A;</p>
<ul>
<li>&#x5BFC;&#x51FA;&#x6A21;&#x5757; <code>OhosDevice</code> &#x4E0E;&#x65B9;&#x6CD5; <code>deviceModel()</code>&#x3002;</li>
<li>&#x901A;&#x8FC7; <code>@ohos.deviceInfo</code> &#x83B7;&#x53D6;&#x6570;&#x636E;&#xFF0C;&#x8FD4;&#x56DE;&#x7ED9; JS&#x3002;</li>
<li>&#x5982;&#x5B9E;&#x73B0; UI &#x7EC4;&#x4EF6;&#xFF0C;&#x9700;&#x5C06; ArkUI &#x7EC4;&#x4EF6;&#x5305;&#x88C5;&#x4E3A; RN Component &#x5E76;&#x5904;&#x7406;&#x5C5E;&#x6027;/&#x4E8B;&#x4EF6;&#x6620;&#x5C04;&#x3002;</li>
</ul>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>JS &#x5F15;&#x64CE;&#x4E0E;&#x6865;&#x63A5;&#x5C42;&#x7A33;&#x5B9A;&#x6027;&#x9A8C;&#x8BC1;&#xFF08;&#x7EBF;&#x7A0B;&#x6A21;&#x578B;&#x4E0E;&#x6D88;&#x606F;&#x961F;&#x5217;&#xFF09;&#x3002;</li>
<li>UI &#x7EC4;&#x4EF6;&#x5E93;&#x8986;&#x76D6;&#xFF1A;&#x5217;&#x8868;&#x3001;&#x6805;&#x683C;&#x3001;&#x5F39;&#x7A97;&#x3001;&#x624B;&#x52BF;&#x3001;&#x52A8;&#x753B;&#x3002;</li>
<li>&#x8C03;&#x8BD5;&#x5DE5;&#x5177;&#x5BF9;&#x9F50;&#xFF1A;Metro&#x3001;DevTools &#x4E0E;&#x9E3F;&#x8499;&#x8BBE;&#x5907;&#x8C03;&#x8BD5;&#x7B56;&#x7565;&#x3002;</li>
</ul>
<hr>
<h2 id="kmp--cmp-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="kmp--cmp-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#kmp--cmp-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>KMP / CMP &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>&#x4E1A;&#x52A1;&#x5C42;&#x590D;&#x7528;&#xFF1A;KMP &#x5171;&#x4EAB;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#xFF08;&#x7F51;&#x7EDC;&#x3001;&#x6570;&#x636E;&#x3001;&#x9886;&#x57DF;&#x670D;&#x52A1;&#xFF09;&#x3002;</li>
<li>UI &#x5C42;&#x65B9;&#x6848;&#xFF1A;Compose Multiplatform&#xFF08;CMP&#xFF09;&#x5B9E;&#x73B0;&#x8DE8;&#x7AEF; UI&#xFF1B;&#x5728;&#x9E3F;&#x8499;&#x4E0A;&#x9700;&#x4E0E; ArkUI/&#x7A97;&#x53E3;&#x7BA1;&#x7406;&#x5BF9;&#x63A5;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x901A;&#x8FC7; expect/actual &#x6216;&#x63A5;&#x53E3;&#x62BD;&#x8C61;&#xFF0C;&#x843D;&#x5730;&#x5230;&#x9E3F;&#x8499;&#x5B9E;&#x73B0;&#xFF08;ArkTS/Java/C++&#xFF09;&#x3002;</li>
</ul>
<p>&#x8BBE;&#x8BA1;&#x793A;&#x4F8B;&#xFF08;&#x63A5;&#x53E3;&#x62BD;&#x8C61;&#xFF0C;&#x542B;&#x6CE8;&#x91CA;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-kotlin"><span class="hljs-comment">// KMP&#xFF1A;&#x5B9A;&#x4E49;&#x8DE8;&#x7AEF;&#x63A5;&#x53E3;&#xFF0C;&#x5728;&#x5404;&#x5E73;&#x53F0;&#x63D0;&#x4F9B;&#x5B9E;&#x9645;&#x5B9E;&#x73B0;</span>
interface DeviceInfoRepo {
    suspend <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">deviceModel</span><span class="hljs-params">()</span>: String</span>
}

<span class="hljs-comment">// &#x4E1A;&#x52A1;&#x5C42;&#x4E0D;&#x611F;&#x77E5;&#x5E73;&#x53F0;&#x7EC6;&#x8282;&#xFF0C;&#x901A;&#x8FC7;&#x4F9D;&#x8D56;&#x6CE8;&#x5165;&#x83B7;&#x53D6;&#x5B9E;&#x73B0;</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">DeviceService</span></span>(<span class="hljs-keyword">private</span> <span class="hljs-variable"><span class="hljs-keyword">val</span> repo</span>: DeviceInfoRepo) {
    suspend <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">summary</span><span class="hljs-params">()</span>: String = repo.<span class="hljs-title">deviceModel</span><span class="hljs-params">()</span></span>
}
</code></pre>
<p>&#x9E3F;&#x8499;&#x5B9E;&#x73B0;&#x8BF4;&#x660E;&#xFF1A;</p>
<ul>
<li>&#x5728;&#x9E3F;&#x8499;&#x7AEF;&#x5B9E;&#x73B0; <code>DeviceInfoRepo</code>&#xFF0C;&#x5185;&#x90E8;&#x8C03;&#x7528; <code>@ohos.deviceInfo</code>&#x3002;</li>
<li>UI &#x5C42;&#x5982;&#x91C7;&#x7528; CMP&#xFF0C;&#x9700;&#x8981;&#x6865;&#x63A5;&#x7A97;&#x53E3;&#x4E0E;&#x8F93;&#x5165;&#x4E8B;&#x4EF6;&#xFF0C;&#x6216;&#x5728; ArkUI &#x5185;&#x5D4C;&#x6E32;&#x67D3;&#x89C6;&#x56FE;&#x3002;</li>
</ul>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>expect/actual &#x5BF9;&#x9F50;&#x4E0E;&#x5E73;&#x53F0;&#x5DE5;&#x7A0B;&#x7EC4;&#x7EC7;&#x3002;</li>
<li>&#x8D44;&#x6E90;/&#x5B57;&#x4F53;/&#x56FD;&#x9645;&#x5316;&#x4E0E;&#x9E3F;&#x8499;&#x5305;&#x7ED3;&#x6784;&#x6620;&#x5C04;&#x3002;</li>
<li>&#x751F;&#x547D;&#x5468;&#x671F;/&#x7A97;&#x53E3;&#x4E8B;&#x4EF6;&#x4E0E;&#x5BFC;&#x822A;&#x72B6;&#x6001;&#x540C;&#x6B65;&#x3002;</li>
</ul>
<hr>
<h2 id="qt-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="qt-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#qt-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>Qt &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>UI/&#x6E32;&#x67D3;&#xFF1A;Qt Widgets/Qt Quick&#xFF08;QML&#xFF09;&#xFF0C;&#x901A;&#x8FC7; Qt for HarmonyOS &#x9002;&#x914D;&#x5C42;&#x8FD0;&#x884C;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x901A;&#x8FC7; Qt &#x63D2;&#x4EF6;&#x6216;&#x76F4;&#x63A5;&#x8C03;&#x7528;&#x9E3F;&#x8499; C/ArkTS &#x80FD;&#x529B;&#xFF08;&#x9700;&#x7F16;&#x5199;&#x6865;&#x63A5;&#xFF09;&#x3002;</li>
<li>&#x6784;&#x5EFA;/&#x6253;&#x5305;&#xFF1A;QMake/CMake&#xFF0C;&#x9075;&#x5FAA;&#x9E3F;&#x8499;&#x5DE5;&#x5177;&#x94FE;&#x4E0E;&#x7B7E;&#x540D;&#x6D41;&#x7A0B;&#x3002;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF08;QML&#xFF0C;&#x542B;&#x6CE8;&#x91CA;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-qml"><span class="hljs-comment">// QML&#xFF1A;&#x57FA;&#x7840;&#x7A97;&#x53E3;&#x4E0E;&#x6309;&#x94AE;&#xFF0C;&#x4F5C;&#x4E3A;&#x9E3F;&#x8499;&#x9002;&#x914D;&#x7684; Qt Quick &#x9875;&#x9762;</span>
<span class="hljs-keyword">import</span><span class="hljs-string"> QtQuick 2.15</span>
<span class="hljs-keyword">import</span><span class="hljs-string"> QtQuick.Controls 2.15</span>

<span class="hljs-decorator">ApplicationWindow</span> {
    <span class="hljs-attribute">visible</span>: <span class="hljs-literal">true</span>
    <span class="hljs-attribute">width</span>: <span class="hljs-number">360</span>; <span class="hljs-attribute">height</span>: <span class="hljs-number">640</span>
    <span class="hljs-attribute">title</span>: qsTr(<span class="hljs-string">&quot;Harmony Qt Demo&quot;</span>)

    <span class="hljs-decorator">Column</span> {
        <span class="hljs-attribute">anchors.centerIn</span>: <span class="hljs-built_in">parent</span>
        <span class="hljs-attribute">spacing</span>: <span class="hljs-number">12</span>
        <span class="hljs-decorator">Label</span> { <span class="hljs-attribute">text</span>: <span class="hljs-string">&quot;Hello HarmonyOS&quot;</span> }
        <span class="hljs-decorator">Button</span> {
            <span class="hljs-attribute">text</span>: <span class="hljs-string">&quot;&#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&quot;</span>
            <span class="hljs-attribute">onClicked</span>: deviceModelLabel.text = Qt.platform.osVersion <span class="hljs-comment">// &#x793A;&#x4F8B;&#xFF1A;&#x6839;&#x636E;&#x9002;&#x914D;&#x5C42;&#x63D0;&#x4F9B;&#x7684; API</span>
        }
        <span class="hljs-decorator">Label</span> { <span class="hljs-attribute">id:</span><span class="hljs-emphasis"> deviceModelLabel</span> }
    }
}
</code></pre>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>&#x8F93;&#x5165;&#x6CD5;/&#x7A97;&#x53E3;&#x7BA1;&#x7406;&#x4E0E;&#x5206;&#x8FA8;&#x7387;&#x9002;&#x914D;&#x3002;</li>
<li>&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x8DEF;&#x5F84;&#x4E0E;&#x6743;&#x9650;&#xFF08;&#x8BFB;&#x5199;&#x3001;&#x5A92;&#x4F53;&#x5E93;&#xFF09;&#x3002;</li>
<li>&#x5B57;&#x4F53;&#x6E32;&#x67D3;&#x4E0E;&#x56FD;&#x9645;&#x5316;&#x3002;</li>
</ul>
<hr>
<h2 id="electron-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="electron-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#electron-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>Electron &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>UI/&#x6E32;&#x67D3;&#xFF1A;Chromium + Node.js&#xFF0C;&#x9002;&#x5408;&#x684C;&#x9762;/&#x5927;&#x5C4F;&#x573A;&#x666F;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x901A;&#x8FC7; Node &#x539F;&#x751F;&#x6A21;&#x5757;&#x6216;&#x6865;&#x63A5;&#x81F3;&#x9E3F;&#x8499; ArkTS &#x80FD;&#x529B;&#xFF08;&#x9700;&#x5C01;&#x88C5;&#xFF09;&#x3002;</li>
<li>&#x6784;&#x5EFA;/&#x6253;&#x5305;&#xFF1A;&#x9002;&#x914D;&#x4ED3;&#x5E93;&#x63D0;&#x4F9B;&#x7684;&#x6784;&#x5EFA;&#x811A;&#x672C;&#x4E0E;&#x53D1;&#x5E03;&#x7B56;&#x7565;&#x3002;</li>
</ul>
<p>&#x6A21;&#x5F0F;&#x793A;&#x4F8B;&#xFF08;&#x4E3B;&#x8FDB;&#x7A0B;&#x4E0E;&#x6E32;&#x67D3;&#x8FDB;&#x7A0B;&#x901A;&#x4FE1;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-comment">// &#x4E3B;&#x8FDB;&#x7A0B;&#xFF1A;&#x66B4;&#x9732;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&#x83B7;&#x53D6;&#x6307;&#x4EE4;</span>
<span class="hljs-keyword">const</span> { ipcMain } = <span class="hljs-built_in">require</span>(<span class="hljs-string">&apos;electron&apos;</span>);

ipcMain.handle(<span class="hljs-string">&apos;ohos/deviceModel&apos;</span>, <span class="hljs-keyword">async</span> () =&gt; {
  <span class="hljs-comment">// &#x901A;&#x8FC7;&#x539F;&#x751F;&#x6A21;&#x5757;&#x6216;&#x6865;&#x63A5;&#x5C42;&#x83B7;&#x53D6;&#x9E3F;&#x8499;&#x8BBE;&#x5907;&#x4FE1;&#x606F;</span>
  <span class="hljs-keyword">return</span> <span class="hljs-string">&apos;Harmony Device Model&apos;</span>;
});

<span class="hljs-comment">// &#x6E32;&#x67D3;&#x8FDB;&#x7A0B;&#xFF1A;&#x8C03;&#x7528;&#x5E76;&#x5C55;&#x793A;</span>
<span class="hljs-keyword">const</span> model = <span class="hljs-keyword">await</span> <span class="hljs-built_in">window</span>.electron.ipcInvoke(<span class="hljs-string">&apos;ohos/deviceModel&apos;</span>);
</code></pre>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>&#x7A97;&#x53E3;&#x7BA1;&#x7406;&#xFF08;&#x591A;&#x7A97;&#x53E3;/&#x4EFB;&#x52A1;&#x6808;&#xFF09;&#x4E0E;&#x7CFB;&#x7EDF;&#x83DC;&#x5355;/&#x6258;&#x76D8;&#x9002;&#x914D;&#x3002;</li>
<li>&#x6587;&#x4EF6;&#x6743;&#x9650;&#x4E0E;&#x5B89;&#x5168;&#x7B56;&#x7565;&#x3002;</li>
<li>Web &#x8C03;&#x8BD5;&#x4E0E;&#x6027;&#x80FD;&#x4F18;&#x5316;&#xFF08;GPU/&#x5185;&#x5B58;&#xFF09;&#x3002;</li>
</ul>
<hr>
<h2 id="cordova-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><a name="cordova-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;" class="plugin-anchor" href="#cordova-&#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;"><i class="fa fa-link" aria-hidden="true"></i></a>Cordova &#x5728;&#x9E3F;&#x8499;&#x7684;&#x9002;&#x914D;&#x8DEF;&#x5F84;</h2>
<ul>
<li>UI/&#x6E32;&#x67D3;&#xFF1A;WebView &#x5BB9;&#x5668;&#xFF0C;&#x9002;&#x5408;&#x5185;&#x5BB9;&#x5C55;&#x793A;&#x4E0E;&#x8F7B;&#x4EA4;&#x4E92;&#x573A;&#x666F;&#x3002;</li>
<li>&#x539F;&#x751F;&#x80FD;&#x529B;&#xFF1A;&#x901A;&#x8FC7; Cordova &#x63D2;&#x4EF6;&#x5C01;&#x88C5;&#x9E3F;&#x8499; API&#x3002;</li>
<li>&#x6784;&#x5EFA;/&#x53D1;&#x5E03;&#xFF1A;&#x7ED3;&#x5408; DevEco Studio &#x4E0E; Cordova CLI &#x7684;&#x6784;&#x5EFA;&#x4E0E;&#x7B7E;&#x540D;&#x6D41;&#x7A0B;&#x3002;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF08;JS &#x63D2;&#x4EF6;&#x8C03;&#x7528;&#xFF0C;&#x542B;&#x6CE8;&#x91CA;&#xFF09;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-comment">// JS&#xFF1A;&#x8C03;&#x7528; Cordova &#x63D2;&#x4EF6;&#xFF0C;&#x83B7;&#x53D6;&#x8BBE;&#x5907;&#x578B;&#x53F7;</span>
<span class="hljs-keyword">var</span> exec = <span class="hljs-built_in">require</span>(<span class="hljs-string">&apos;cordova/exec&apos;</span>);

exports.deviceModel = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">success, error</span>) </span>{
  <span class="hljs-comment">// &quot;OhosDevice&quot; &#x4E3A;&#x539F;&#x751F;&#x63D2;&#x4EF6;&#x540D;&#xFF0C;&quot;deviceModel&quot; &#x4E3A;&#x65B9;&#x6CD5;&#x540D;</span>
  exec(success, error, <span class="hljs-string">&apos;OhosDevice&apos;</span>, <span class="hljs-string">&apos;deviceModel&apos;</span>, []);
};
</code></pre>
<p>&#x539F;&#x751F;&#x4FA7;&#xFF08;ArkTS&#xFF09;&#x804C;&#x8D23;&#x8BF4;&#x660E;&#xFF1A;</p>
<ul>
<li>&#x5B9E;&#x73B0;&#x63D2;&#x4EF6;&#x7C7B; <code>OhosDevice</code> &#x4E0E;&#x65B9;&#x6CD5; <code>deviceModel()</code>&#x3002;</li>
<li>&#x8C03;&#x7528; <code>@ohos.deviceInfo</code>&#xFF0C;&#x5E76;&#x5C06;&#x7ED3;&#x679C;&#x56DE;&#x4F20; WebView&#x3002;</li>
</ul>
<p>&#x9002;&#x914D;&#x6E05;&#x5355;&#xFF1A;</p>
<ul>
<li>WebView &#x4E0E;&#x7CFB;&#x7EDF; Web &#x80FD;&#x529B;&#x9002;&#x914D;&#xFF08;&#x7F13;&#x5B58;&#x3001;Storage&#x3001;Cookie&#xFF09;&#x3002;</li>
<li>&#x6743;&#x9650;&#x5F39;&#x7A97;&#x4E0E;&#x5F02;&#x5E38;&#x515C;&#x5E95;&#x3002;</li>
<li>&#x6DF7;&#x5408;&#x5BFC;&#x822A;&#x4E0E;&#x5916;&#x90E8;&#x94FE;&#x63A5;&#x5B89;&#x5168;&#x3002;</li>
</ul>
<hr>
<h2 id="&#x5E38;&#x89C1;&#x9002;&#x914D;&#x95EE;&#x9898;&#x4E0E;&#x6392;&#x9519;"><a name="&#x5E38;&#x89C1;&#x9002;&#x914D;&#x95EE;&#x9898;&#x4E0E;&#x6392;&#x9519;" class="plugin-anchor" href="#&#x5E38;&#x89C1;&#x9002;&#x914D;&#x95EE;&#x9898;&#x4E0E;&#x6392;&#x9519;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5E38;&#x89C1;&#x9002;&#x914D;&#x95EE;&#x9898;&#x4E0E;&#x6392;&#x9519;</h2>
<ul>
<li>&#x6743;&#x9650;&#x58F0;&#x660E;&#x4E0E;&#x52A8;&#x6001;&#x6388;&#x6743;&#xFF1A;&#x672A;&#x58F0;&#x660E;&#x6216;&#x672A;&#x6388;&#x6743;&#x5BFC;&#x81F4; API &#x5931;&#x8D25;&#xFF1B;&#x9700;&#x5728; <code>module.json5</code> &#x58F0;&#x660E;&#x5E76;&#x63D0;&#x793A;&#x7528;&#x6237;&#x6388;&#x6743;&#x3002;</li>
<li>&#x751F;&#x547D;&#x5468;&#x671F;&#x4E0E;&#x7A97;&#x53E3;&#xFF1A;&#x591A;&#x7A97;&#x53E3;/&#x4EFB;&#x52A1;&#x6808;&#x4E0E;&#x9875;&#x9762;&#x8DEF;&#x7531;&#x4E0D;&#x540C;&#x6B65;&#xFF1B;&#x9700;&#x7EDF;&#x4E00;&#x8DEF;&#x7531;&#x72B6;&#x6001;&#x4E0E;&#x4EFB;&#x52A1;&#x6808;&#x7BA1;&#x7406;&#x7B56;&#x7565;&#x3002;</li>
<li>&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#xFF1A;&#x8DEF;&#x5F84;&#x5DEE;&#x5F02;&#x4E0E;&#x6C99;&#x7BB1;&#x9650;&#x5236;&#xFF1B;&#x7EDF;&#x4E00;&#x5C01;&#x88C5;&#x6587;&#x4EF6;&#x670D;&#x52A1;&#x5E76;&#x5904;&#x7406;&#x5F02;&#x5E38;&#x3002;</li>
<li>&#x56FD;&#x9645;&#x5316;&#x4E0E;&#x8D44;&#x6E90;&#xFF1A;&#x8D44;&#x6E90;&#x76EE;&#x5F55;&#x7ED3;&#x6784;&#x4E0D;&#x540C;&#xFF1B;&#x5EFA;&#x7ACB;&#x8D44;&#x6E90;&#x7BA1;&#x7406;&#x5C42;&#x7EDF;&#x4E00;&#x52A0;&#x8F7D;&#x3002;</li>
<li>&#x8C03;&#x8BD5;&#x4E0E;&#x65E5;&#x5FD7;&#xFF1A;&#x8BBE;&#x5907;&#x8FDE;&#x63A5;&#x4E0E;&#x8FDC;&#x7A0B;&#x8C03;&#x8BD5;&#xFF1B;&#x7EDF;&#x4E00;&#x65E5;&#x5FD7;&#x63A5;&#x53E3;&#x5E76;&#x8F93;&#x51FA;&#x5230;&#x7CFB;&#x7EDF;&#x65E5;&#x5FD7;&#x3002;</li>
</ul>
<hr>
<h2 id="&#x5FEB;&#x901F;&#x5BF9;&#x7167;&#x6E05;&#x5355;"><a name="&#x5FEB;&#x901F;&#x5BF9;&#x7167;&#x6E05;&#x5355;" class="plugin-anchor" href="#&#x5FEB;&#x901F;&#x5BF9;&#x7167;&#x6E05;&#x5355;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5FEB;&#x901F;&#x5BF9;&#x7167;&#x6E05;&#x5355;</h2>
<ul>
<li>&#x660E;&#x786E;&#x76EE;&#x6807;&#x5E73;&#x53F0;&#x4E0E;&#x8BBE;&#x5907;&#x7C7B;&#x578B;&#xFF08;&#x624B;&#x673A;/&#x5E73;&#x677F;/&#x684C;&#x9762;/&#x5927;&#x5C4F;&#xFF09;&#x3002;</li>
<li>&#x9009;&#x578B;&#x7EF4;&#x5EA6;&#xFF1A;&#x6027;&#x80FD;&#x3001;&#x751F;&#x6001;&#x3001;&#x56E2;&#x961F;&#x6280;&#x80FD;&#x3001;&#x9E3F;&#x8499;&#x652F;&#x6301;&#x6210;&#x719F;&#x5EA6;&#x3002;</li>
<li>&#x5EFA;&#x7ACB;&#x6865;&#x63A5;&#x5C42;&#xFF08;&#x62BD;&#x8C61;&#x63A5;&#x53E3;&#x6216;&#x63D2;&#x4EF6;&#x673A;&#x5236;&#xFF09;&#xFF0C;&#x9694;&#x79BB;&#x5E73;&#x53F0;&#x5DEE;&#x5F02;&#x3002;</li>
<li>&#x4F18;&#x5148;&#x5B9E;&#x73B0;&#xFF1A;&#x8BBE;&#x5907;&#x4FE1;&#x606F;&#x3001;&#x7F51;&#x7EDC;&#x3001;&#x5B58;&#x50A8;&#x3001;&#x7A97;&#x53E3;&#x4E0E;&#x5BFC;&#x822A;&#x7B49;&#x57FA;&#x7840;&#x80FD;&#x529B;&#x3002;</li>
<li>&#x914D;&#x7F6E;&#x7B7E;&#x540D;&#x4E0E;&#x53D1;&#x5E03;&#x6D41;&#x7A0B;&#xFF0C;&#x5EFA;&#x7ACB; CI/CD &#x4E0E;&#x8BBE;&#x5907;&#x6D4B;&#x8BD5;&#x77E9;&#x9635;&#x3002;</li>
</ul>
<hr>
<h2 id="&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF08;&#x7CBE;&#x9009;&#xFF09;"><a name="&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF08;&#x7CBE;&#x9009;&#xFF09;" class="plugin-anchor" href="#&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF08;&#x7CBE;&#x9009;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF08;&#x7CBE;&#x9009;&#xFF09;</h2>
<ul>
<li>Flutter&#xFF1A;docs.flutter.dev&#xFF1B;&#x9002;&#x914D;&#x4ED3;&#x5E93;&#x4E0E;&#x793A;&#x4F8B;&#x89C1; GitCode &#x7EC4;&#x7EC7;&#x3002;</li>
<li>React Native&#xFF1A;reactnative.cn&#xFF1B;&#x9E3F;&#x8499;&#x9002;&#x914D;&#x6587;&#x6863;&#x4E0E;&#x793A;&#x4F8B;&#x6A21;&#x5757;&#x3002;</li>
<li>KMP/CMP&#xFF1A;JetBrains &#x5B98;&#x65B9;&#x6587;&#x6863;&#x4E0E;&#x9E3F;&#x8499;&#x9002;&#x914D;&#x6307;&#x5357;&#x3002;</li>
<li>Qt for HarmonyOS&#xFF1A;&#x5B98;&#x65B9; Wiki &#x4E0E;&#x9002;&#x914D;&#x6587;&#x6863;&#x3001;&#x793A;&#x4F8B;&#x5DE5;&#x7A0B;&#x3002;</li>
<li>Electron&#xFF1A;&#x5B98;&#x65B9;&#x6587;&#x6863;&#x4E0E;&#x9E3F;&#x8499;&#x9002;&#x914D;&#x6307;&#x5357;&#x3002;</li>
<li>Cordova&#xFF1A;&#x5B98;&#x65B9;&#x7AD9;&#x70B9;&#x4E0E; OpenHarmony-Cordova &#x793A;&#x4F8B;&#x3002;</li>
</ul>
<blockquote>
<p>&#x6CE8;&#xFF1A;&#x5177;&#x4F53; API &#x540D;&#x79F0;&#x4E0E;&#x9002;&#x914D;&#x65B9;&#x5F0F;&#x4EE5;&#x5404;&#x6808;&#x6700;&#x65B0;&#x9002;&#x914D;&#x4ED3;&#x5E93;&#x4E3A;&#x51C6;&#xFF0C;&#x4EE5;&#x4E0A;&#x793A;&#x4F8B;&#x7528;&#x4E8E;&#x8BF4;&#x660E;&#x201C;&#x6865;&#x63A5;&#x601D;&#x8DEF;&#x4E0E;&#x804C;&#x8D23;&#x5206;&#x5C42;&#x201D;&#xFF0C;&#x5B9E;&#x9645;&#x4EE3;&#x7801;&#x9700;&#x7ED3;&#x5408;&#x6240;&#x9009;&#x7248;&#x672C;&#x4E0E;&#x5DE5;&#x5177;&#x94FE;&#x5B9E;&#x73B0;&#x3002; </p>
</blockquote>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-11-10 12:24:20
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://blog.snowdreams1006.cn/assets/js/readmore.js" type="text/javascript"></script>
                <script>
                    var btw = new BTWPlugin();
                    btw.init({"blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"});
                </script>
                 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="../"
      class="navigation navigation-prev "
      aria-label="Previous page: 前言"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="技术选型与对比.html"
      class="navigation navigation-next "
      aria-label="Next page: 技术选型与对比（性能、生态、鸿蒙支持）"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"跨平台框架总览（Flutter、RN、KMP、CMP、Qt、Electron、Cordova）","level":"1.2","depth":1,"next":{"title":"技术选型与对比（性能、生态、鸿蒙支持）","level":"1.3","depth":1,"path":"chapter1/技术选型与对比.md","ref":"./chapter1/技术选型与对比.md","articles":[]},"previous":{"title":"前言","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","website":"styles/website.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.nutpie.net/","name":"坚果派官网"},{"target":"_blank","url":"https://www.npmjs.com/package/package","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://blog.51cto.com/jianguo","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"开源鸿蒙跨平台开发教程","language":"zh-hans","gitbook":"*","description":"开源鸿蒙跨平台开发电子书教程"},"file":{"path":"chapter1/跨平台框架总览.md","mtime":"2025-11-10T04:24:20.981Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-11-10T05:42:35.446Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/jweixin-1.6.0.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

